package com.example.finance_oa.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.comment_oa.pojos.Additional;
import com.example.comment_oa.pojos.Budget;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Jin
* @description 针对表【budget】的数据库操作Mapper
* @createDate 2022-10-25 10:26:37
* @Entity com.example.finance_oa.pojos.Budget
*/
@Mapper
public interface BudgetMapper extends BaseMapper<Budget> {
//    查询某部门的预算
    List<Budget>  allBudget(Budget budget);


    //查询预算科目
    List<Budget>   findAllByBudgetKm();
    //查询预算部门
    List<Budget>   findAllByBudgetBm();

    //查询预算信息
    List<Budget> allXx(Budget budget);


    //根据预算部门，年度，科目新增预算额
    int updateBudget(Budget budget);


    //根据预算部门，年度，科目减少预算额
    int updateBudget1(Budget budget);



    //根据年月查询预算额
    List<Budget> selectByyear(@Param("budgetYear")String budgetyear,@Param("budgetMonth")String budgetMonth);



    //根据年月，部门名，科目名，
    List<Budget> selectBycs(@Param("budgetYear")String budgetYear,@Param("budgetMonth")String budgetMonth,
                            @Param("deptName")String deptName,@Param("budgetKm")String budgetKm);

    //根据年月日，部门，科目来修改初始预算额
    int updateCsys(@Param("budgetCsmoney")Double budgetCsmoney,@Param("budgetYear")String budgetYear,@Param("budgetMonth")String budgetMonth,@Param("deptName")String deptName,@Param("budgetKm")String budgetKm);


    //根据年月日，部门，科目来修改剩余额
    int updateSyys(@Param("budgetSymoney")Double budgetSymoney,@Param("budgetYear")String budgetYear,@Param("budgetMonth")String budgetMonth,@Param("deptName")String deptName,@Param("budgetKm")String budgetKm);

    //根据年月日，部门，科目来增加初始预算额
    int updateCsys2(@Param("budgetCsmoney")Double budgetCsmoney,@Param("budgetYear")String budgetYear,@Param("budgetMonth")String budgetMonth,@Param("deptName")String deptName,@Param("budgetKm")String budgetKm);






}




